#ifndef LISTOPERATION_H
#define LISTOPERATION_H
#include<QList>

class ListOperation
{
public:
    ListOperation();

    int ListMax_Index(QList<double>l);
    double ListMax_Val(QList<double>l);
    int ListMin_Index(QList<double>l);
    double ListMin_Val(QList<double>l);
    double ListAverage(QList<int>l);
    double ListAverage(QList<double>l);
    QList<int> ListSub(QList<int>,int startIndex,int ListLength);
    QList<double> ListSub(QList<double>,int startIndex,int ListLength);
    // QList<int> ListSortbySX(QList<int>List);
    // QList<int> ListSortbyJX(QList<int>list);
    QList<int>ListDiff(QList<int>list);
    QList<double>ListDiff(QList<double>list);
    int DotP(QList<double>l1,QList<double>l2);
    QList<double> NumMulArray(double Num,QList<double>l);
    QList<double> ArrMulArr(QList<double>l1,QList<double>l2);
    QList<double>  ArrayReverse(QList<double> arr);
    double mean(QList<double>l);
//    struct AROutput AR(int sample,QList<int> RRInterval);
    QList<double> SubList(QList<double>l,int index,int len);
    QList<double> DelList(QList<double>l,int len);
    struct FrequencyMember FrequencyComp(struct AROutput aro);
    struct ArrayMinMaxValIndex ListMinMaxValIndex(QList<double>l);
    double ListSum(QList<double>l);
    struct TimeMember TimeComp(QList<int> RR);
    double ListMean(QList<double> l);
    double ListMean(QList<int>l);
    int ListMin_Val_Int(QList<int>l);
    int ListMax_Val_Int(QList<int>l);
    double ListRMS(QList<int>l);
    QList<int> ListAddRR(QList<int>l1,QList<int>l2);
    QList<int> ListAddRpos(QList<int>l1,QList<int>l2);
    double ListSTD(QList<int>l);
    double ListSTD(QList<double>l);
    int NumofGreatthanFiftyArr(QList<int>l);
    QList<int> ArrayofDiff(QList<int>l);
    QList<int> NumAddArray(int num,QList<int>l);
    QList<int> DelRepeatNum(QList<int>l);
    QList<double> ListAndList(QList<double>l1,QList<double>l2);
    int mean_int(QList<int>l);
};

#endif // LISTOPERATION_H
